package com.adopapa.nezhacloud.authc.domain;

import com.adopapa.nezhacloud.ddd.codegen.CodeGen;
import com.adopapa.nezhacloud.ddd.domain.BaseUuidEntity;

import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

@Entity
@Table(name = "AUTHC_ROLE_PERM")
public class RolePerm extends BaseUuidEntity {

	private static final long serialVersionUID = 8107359060857529084L;

	@CodeGen(query = "=")
	@ManyToOne
	@JoinColumn(name = "USER_ID")
	private UserInfo userInfo;

	@CodeGen(query = "=")
	@ManyToOne
	@JoinColumn(name = "ROLE_ID")
	private RoleInfo roleInfo;

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public RoleInfo getRoleInfo() {
		return roleInfo;
	}

	public void setRoleInfo(RoleInfo roleInfo) {
		this.roleInfo = roleInfo;
	}

}
